home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / UNIXTOOL / BDF / _files / _bdf / _ReadMe next >
Text File  |  1990-09-09  |  10KB  |  229 lines

  1. Documentation for bdf V1.02 (C) Richard K. Lloyd 1990
  2. ---------------------------
  3.  
  4. *********************  Very boring Copyright Notice  ********************
  5. *                                                                       *
  6. *    The source code and documentation for the bdf program are the      *
  7. * exclusive copyright of Richard K. Lloyd and are freely distributable, *
  8. *                  provided this notice is left intact.                 *
  9. *                                                                       *
  10. *************************************************************************
  11.  
  12. Credits
  13. -------
  14.  
  15. Michael Ben-Gershon (umace03@uk.ac.ic.doc) for supplying SCSIFS support
  16. and adding checks for the FS existence before attempting SWI calls to the FS.
  17.  
  18. Machine/Configuration Requirements
  19. ----------------------------------
  20.  
  21. Any Archimedes running RISC OS 2.00 or higher. Not tested with Arthur 1.20.
  22. Needs Minerva's MSDOS module to be present to work with MS-DOS disks.
  23. Now works with SCSI drives. Still doesn't with Econet (NetFS) drives...
  24.  
  25. Introduction
  26. ------------
  27.  
  28. UN*X has a nicely laid-out command (for a change !) called "bdf" which gives
  29. a summary of the sizes and usage of all mounted disks on the system. It's
  30. easily the best command to use when your system is in a filestore crisis.
  31. Note: "bdf" is the name used for System V UN*X, but BSD 4.X users may know it
  32.       as "df" instead.
  33.  
  34. Unfortunately, although the Archimedes has the *Free command, it only applies
  35. to ONE drive (defaults to the current one) on the CURRENT filing system
  36. (unless overridden by using *-fsname-Free) and only gives the tersest of
  37. information (bytes free and bytes used to be exact).
  38.  
  39. I decided to group together all the information from all the filing systems
  40. I could cope with, add a few extra bits and lay the whole thing out as close
  41. to UN*X "bdf" as possible.
  42.  
  43. The bdf command
  44. ---------------
  45.  
  46. Syntax: *bdf [-f] [-s]
  47.  
  48. Options: If none supplied, then drives are listed in the FS order specified
  49.          in the routine PROCscansystems in the code. You are welcome to
  50.          re-order the FSs to your personal preferences.
  51.  
  52.          If -f is specified, then drives are listed in descending free space
  53.          order (VERY handy for shifting files about in a filestore crisis).
  54.          
  55.          If -s is specified, then drives are listed in descending size order.
  56.  
  57.          Historical note: UN*X bdf only has the -i qualifier (free nodes are
  58.                           displayed as well) and DOESN'T have the -f or -s
  59.                           qualifiers.
  60.  
  61. Action:
  62.  
  63. Scans ADFS, MSDOS, SCSIFS and RamFS drives for mounted disks and extracts
  64. the disk size, disk space free, disk space used, percentage used and disk
  65. title. Empty drives or drives containing unformatted disks will not be
  66. displayed. Numeric information is displayed in truncated kilobytes or
  67. percentages. Nothing is displayed until all drives are scanned (to allow
  68. for possible sorting) and if no valid mounted drives are found, then NOTHING
  69. (not even the heading) will be displayed.
  70.  
  71. If more than one mounted drive was found, then bdf displays a grand total
  72. line as well, summing the figures obtained for all the drives.
  73.  
  74. Known problems
  75. --------------
  76.  
  77. * NetFS drives are currently not supported by this program because I simply
  78.   don't know how to do it ! There's no equivalent to ADFS_FreeSpace etc. for
  79.   NetFS. I personally consider this to be a gaping hole in the RISC OS Econet
  80.   support and I hope it will be remedied in the next release. As far as I can
  81.   tell, all the code to do it is embedded into the *NetFS:Free command !
  82.  
  83. * Unformatted or MS-DOS disks in a drive slow down the scanning process
  84.   considerably.
  85.  
  86. Minerva's !PC-Access V1.46
  87. --------------------------
  88.  
  89. Minerva are currently marketing an MS-DOS filing system and Filer under the
  90. name !PC-Access. This implements a SUBSET of ADFS filing system commands to
  91. allow MS-DOS disks to appear in a Desktop Filer window and their files to be
  92. dragged onto an ADFS Filer window to copy them. HOWEVER, there are some
  93. dodgy features of !PC-Access...
  94.  
  95. 1) It doesn't translate/truncate names very well, especially when dragging
  96.    from ADFS to MS-DOS. You always seem to get "MS-DOS name too long" errors,
  97.    making it very awkward to use.
  98.  
  99. 2) You can't seem to be able to use *Copy to copy between a non-current
  100.    MS-DOS drive and an ADFS drive without using *-msdos-Mount first to
  101.    signal a new current MS-DOS drive. This is because !PC-Acesss ignores
  102.    the "msdos::1" syntax and always looks at the "current" MS-DOS drive
  103.    for its filing operations. THIS IS ULTRA-NAFF.
  104.  
  105. 3) *Cat on an empty MS-DOS disk generates an error (I suspect this is to
  106.    do with a wildcard match facility but it is very bad programming) !
  107.  
  108. 4) SWI "XMSOS_Drives" is poorly implemented, because the value for the floppy
  109.    drives is returned in bits (e.g. %111 means 3 drives), whereas the value for
  110.    the hard drives is returned as a normal number.
  111.  
  112. 5) SWI "XMSDOS_FreeSpace" doesn't conform to the FileCore standard either -
  113.    it takes the drive to be checked as a number rather than as a pointer to
  114.    a null-terminated drive string.
  115.  
  116. 6) SWI "XMSDOS_DescribeDisc" simply doesn't exist. This is a grave omission
  117.    by Minerva and should be fixed as soon as possible.
  118.  
  119. However, after all these problems, I've still decided to support this MSDOS
  120. module - it is a filing system after all. Until "XMSDOS_DescribeDisc" is
  121. supplied, I have to assume that the disk is 720K and I cannot display its
  122. volume title either. By the way, the MSDOS module seems to claim that
  123. 720K disks are actually 711K in size if you add up the used and free figures
  124. generated by *msdos:Free !
  125.  
  126. Please Note:
  127.  
  128. I don't work for Minerva and I certainly have nothing to do with the
  129. !PC-Access program. In fact, I wouldn't recommend buying it until the
  130. faults I mention above are fixed.
  131.  
  132. Current differences between Archimedes bdf and UN*X bdf
  133. -------------------------------------------------------
  134.  
  135. * Archimedes bdf reports the EXACT percentage used, rather than allowing
  136.   for the 10% 'emergency space' that UN*X bdf allocates. Hence you can only
  137.   reach 100% with Archimedes bdf, whereas you can reach 110% on UN*X bdf,
  138.   which I consider to be utterly stupid...
  139.  
  140. * Archimedes bdf uses different qualifiers compared to UN*X bdf. The latter
  141.   has an esoteric qualifier "-i" which reports the number of inodes
  142.   free (pretty meaningless to 99% of normal users) - this fails with
  143.   NFS-mounted volumes anyway (reports -1 inodes free !).
  144.  
  145. * UN*X bdf is known to 'hang' for long periods if an NFS-mounted volume is
  146.   not available (usually because the system it is attached to has gone down).
  147.   Since NetFS drives are not supported with V1.01 of Archimedes bdf, this
  148.   isn't a problem (yet) ! However, unformatted or MS-DOS disks do cause a
  149.   delay in the drive scanning.
  150.  
  151. * UN*X bdf reports ALL partitions on the system, whether locally or remotely
  152.   mounted. Archimedes bdf only knows about local disc drives and the RAM disc
  153.   as of the current release.
  154.  
  155. * UN*X bdf does not report the 'grand total' of disk space across all drives -
  156.   it leaves you to get a pen and paper out and add the figures up !
  157.  
  158. Revision History of the bdf command
  159. -----------------------------------
  160.  
  161. Version 1.02 (September 1990)
  162. -----------------------------
  163.  
  164. * If Minerva's MSDOS module is present (part of their !PC-Access program),
  165.   then any MS-DOS floppies (not sure about hard disks) will be scanned.
  166.   Due to unimplemented calls in the MSDOS module, I have to assume that
  167.   the floppies are 720K in size and I can't find the volume title either.
  168.  
  169. * Added an array to flag if a drive has already been scanned and found to
  170.   contain a valid disk. This prevents two scans on drives (e.g. once for
  171.   ADFS and again for MSDOS).
  172.  
  173. * I now check for the existence of the FS SWI before attempting to use it.
  174.   This bypasses any problems with partially implemented filing systems.
  175.  
  176. Version 1.01 (August 1990)
  177. --------------------------
  178.  
  179. * Received SCSIFS support code and FS existence checks from Michael
  180.   Ben-Gershon. These were implemented, but the code was due for a drastic
  181.   re-work anyway :-)
  182.  
  183. * Stored information in a couple of arrays rather than immediately printing
  184.   it out.
  185.  
  186. * Able to implement sorting according to size or free space now - added two
  187.   qualifiers (-s and -f) to cope with this.
  188.  
  189. * Added a grand total line if more than one mounted drive was found.
  190.  
  191. * Increased the field width from 7 to 9 characters for aesthetic reasons.
  192.  
  193. Version 1.00 (July 1990)
  194. ------------------------
  195.  
  196. * Written as a small BASIC program just so that I could get the calls right
  197.   and develop the thing in a couple of hours or so. When the BASIC code
  198.   stabilises, I'll tackle the whole thing and convert it into an RMA Utility
  199.   program (ho hum, don't hold your breath for that - the percentage bits will
  200.   mean I'll have to wheel out a 32-bit division algorithm in ARM code...).
  201.  
  202. * Left NetFS support skeleton (utterly wrong though...) ready for some
  203.   enterprising hacker to have a go. Don't forget to contact me and tell
  204.   me about the changes though !
  205.  
  206. Future improvements to bdf V1.02
  207. --------------------------------
  208.  
  209. * Support NetFS drives. I'm leaving the field wide open here for anyone to
  210.   have a stab at the code for this. I've had a go by 'cheating' - disassembling
  211.   the NetFS module to see how it implements *Free...and it's a SWINE !
  212.   I suspect that a wizard at Acorn (who are probably the only Econet users
  213.   out there anyway - ouch, that was a low blow) might be able to come up with
  214.   something.
  215.  
  216. * Find a quicker way to "time-out" the ADFS scan when there's an MS-DOS disk
  217.   (or, in fact, an unformatted disk) in the drive. Any ideas out out there ?
  218.  
  219. Where to find me to report bugs or improvements to the bdf command
  220. ------------------------------------------------------------------  
  221.  
  222. Snail Mail           JANET e-mail
  223. ----------           ------------
  224. Richard K. Lloyd,    rkl@uk.ac.liv.cs.and
  225. 1, Banks Road,
  226. Lower Heswall,
  227. Wirral,
  228. Merseyside. 
  229.